Filename | (eval 1130)[/usr/lib/perl5/Template/Document.pm:78] |
Statements | Executed 4 statements in 5µs |
Eval Invoked At | /usr/lib/perl5/Template/Document.pm line 78 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8 |
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | sub { | ||||
2 | 1 | 800ns | my $context = shift || die "template sub called without context\n"; | ||
3 | 1 | 3µs | 1 | 4µs | my $stash = $context->stash; # spent 4µs making 1 call to Template::Context::stash |
4 | 1 | 500ns | my $output = ''; | ||
5 | 1 | 200ns | my $_tt_error; | ||
6 | |||||
7 | eval { BLOCK: { | ||||
8 | #line 3 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
9 | if (($stash->get('opaccredits'))) { | ||||
10 | $output .= " <div class=\"ft\">\n "; | ||||
11 | #line 2 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
12 | $output .= $stash->get('opaccredits'); | ||||
13 | $output .= " </div>\n"; | ||||
14 | } | ||||
15 | |||||
16 | $output .= " </div>\n\n"; | ||||
17 | #line 24 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
18 | if (($stash->get('opaclanguagesdisplay') || $stash->get('OpacKohaUrl'))) { | ||||
19 | $output .= " "; | ||||
20 | #line 18 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
21 | if (($stash->get('languages_loop') && $stash->get('opaclanguagesdisplay'))) { | ||||
22 | $output .= " "; | ||||
23 | #line 18 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
24 | if (!(($stash->get('one_language_enabled')))) { | ||||
25 | $output .= " <div id=\"changelanguage\" class=\"ft\">\n <div class=\"lang\"><strong>Languages: </strong></div>\n <ul id=\"i18nMenu\" class=\"footermenu\">\n "; | ||||
26 | #line 16 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
27 | |||||
28 | # FOREACH | ||||
29 | do { | ||||
30 | my ($_tt_value, $_tt_error, $_tt_oldloop); | ||||
31 | my $_tt_list = $stash->get('languages_loop'); | ||||
32 | |||||
33 | unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { | ||||
34 | $_tt_list = Template::Config->iterator($_tt_list) | ||||
35 | || die $Template::Config::ERROR, "\n"; | ||||
36 | } | ||||
37 | |||||
38 | ($_tt_value, $_tt_error) = $_tt_list->get_first(); | ||||
39 | eval { $_tt_oldloop = $stash->get('loop') }; | ||||
40 | $stash->set('loop', $_tt_list); | ||||
41 | eval { | ||||
42 | FOR1: while (! $_tt_error) { | ||||
43 | $stash->{'languages_loo'} = $_tt_value; | ||||
44 | $output .= " "; | ||||
45 | #line 16 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
46 | if (($stash->get(['languages_loo', 0, 'group_enabled', 0]))) { | ||||
47 | $output .= " "; | ||||
48 | #line 16 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
49 | if (($stash->get(['languages_loo', 0, 'plural', 0]))) { | ||||
50 | $output .= " <li class=\"more\"><a class=\"sublangs\" id=\"show"; | ||||
51 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
52 | $output .= $stash->get(['languages_loo', 0, 'rfc4646_subtag', 0]); | ||||
53 | $output .= "\" href=\"#\">"; | ||||
54 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
55 | if (($stash->get(['languages_loo', 0, 'native_description', 0]))) { | ||||
56 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
57 | $output .= $stash->get(['languages_loo', 0, 'native_description', 0]); | ||||
58 | } | ||||
59 | else { | ||||
60 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
61 | $output .= $stash->get(['languages_loo', 0, 'rfc4646_subtag', 0]); | ||||
62 | } | ||||
63 | |||||
64 | $output .= "</a><div id=\"sub"; | ||||
65 | #line 8 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
66 | $output .= $stash->get(['languages_loo', 0, 'rfc4646_subtag', 0]); | ||||
67 | $output .= "\">\n <div class=\"bd\"><ul>\n "; | ||||
68 | #line 12 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
69 | |||||
70 | # FOREACH | ||||
71 | do { | ||||
72 | my ($_tt_value, $_tt_error, $_tt_oldloop); | ||||
73 | my $_tt_list = $stash->get(['languages_loo', 0, 'sublanguages_loop', 0]); | ||||
74 | |||||
75 | unless (UNIVERSAL::isa($_tt_list, 'Template::Iterator')) { | ||||
76 | $_tt_list = Template::Config->iterator($_tt_list) | ||||
77 | || die $Template::Config::ERROR, "\n"; | ||||
78 | } | ||||
79 | |||||
80 | ($_tt_value, $_tt_error) = $_tt_list->get_first(); | ||||
81 | eval { $_tt_oldloop = $stash->get('loop') }; | ||||
82 | $stash->set('loop', $_tt_list); | ||||
83 | eval { | ||||
84 | FOR2: while (! $_tt_error) { | ||||
85 | $stash->{'sublanguages_loo'} = $_tt_value; | ||||
86 | $output .= " "; | ||||
87 | #line 12 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
88 | if (($stash->get(['sublanguages_loo', 0, 'enabled', 0]))) { | ||||
89 | $output .= " "; | ||||
90 | #line 12 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
91 | if (($stash->get(['sublanguages_loo', 0, 'sublanguage_current', 0]))) { | ||||
92 | $output .= " <li> "; | ||||
93 | #line 10 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
94 | $output .= $stash->get(['sublanguages_loo', 0, 'native_description', 0]); | ||||
95 | $output .= " "; | ||||
96 | #line 10 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
97 | $output .= $stash->get(['sublanguages_loo', 0, 'script_description', 0]); | ||||
98 | $output .= " "; | ||||
99 | #line 10 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
100 | $output .= $stash->get(['sublanguages_loo', 0, 'region_description', 0]); | ||||
101 | $output .= " "; | ||||
102 | #line 10 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
103 | $output .= $stash->get(['sublanguages_loo', 0, 'variant_description', 0]); | ||||
104 | $output .= " ("; | ||||
105 | #line 10 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
106 | $output .= $stash->get(['sublanguages_loo', 0, 'rfc4646_subtag', 0]); | ||||
107 | $output .= ")</li>\n "; | ||||
108 | } | ||||
109 | else { | ||||
110 | $output .= " <li><a href=\"/cgi-bin/koha/opac-changelanguage.pl?language="; | ||||
111 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
112 | $output .= $stash->get(['sublanguages_loo', 0, 'rfc4646_subtag', 0]); | ||||
113 | $output .= "\"> "; | ||||
114 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
115 | $output .= $stash->get(['sublanguages_loo', 0, 'native_description', 0]); | ||||
116 | $output .= " "; | ||||
117 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
118 | $output .= $stash->get(['sublanguages_loo', 0, 'script_description', 0]); | ||||
119 | $output .= " "; | ||||
120 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
121 | $output .= $stash->get(['sublanguages_loo', 0, 'region_description', 0]); | ||||
122 | $output .= " "; | ||||
123 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
124 | $output .= $stash->get(['sublanguages_loo', 0, 'variant_description', 0]); | ||||
125 | $output .= " ("; | ||||
126 | #line 11 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
127 | $output .= $stash->get(['sublanguages_loo', 0, 'rfc4646_subtag', 0]); | ||||
128 | $output .= ")</a></li>\n "; | ||||
129 | } | ||||
130 | |||||
131 | $output .= " "; | ||||
132 | } | ||||
133 | |||||
134 | $output .= " ";; | ||||
135 | ($_tt_value, $_tt_error) = $_tt_list->get_next(); | ||||
136 | } | ||||
137 | }; | ||||
138 | $stash->set('loop', $_tt_oldloop); | ||||
139 | die $@ if $@; | ||||
140 | $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; | ||||
141 | die $_tt_error if $_tt_error; | ||||
142 | }; | ||||
143 | |||||
144 | $output .= " </ul></div></div></li>\n\n "; | ||||
145 | } | ||||
146 | else { | ||||
147 | $output .= " "; | ||||
148 | #line 16 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
149 | if (($stash->get(['languages_loo', 0, 'group_enabled', 0]))) { | ||||
150 | $output .= " "; | ||||
151 | #line 16 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
152 | if (($stash->get(['languages_loo', 0, 'current', 0]))) { | ||||
153 | $output .= " <li class=\"morelang\">"; | ||||
154 | #line 14 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
155 | if (($stash->get(['languages_loo', 0, 'native_description', 0]))) { | ||||
156 | #line 14 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
157 | $output .= $stash->get(['languages_loo', 0, 'native_description', 0]); | ||||
158 | } | ||||
159 | else { | ||||
160 | #line 14 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
161 | $output .= $stash->get(['languages_loo', 0, 'rfc4646_subtag', 0]); | ||||
162 | } | ||||
163 | |||||
164 | $output .= "</li>\n "; | ||||
165 | } | ||||
166 | else { | ||||
167 | $output .= " <li class=\"morelang\"><a href=\"/cgi-bin/koha/opac-changelanguage.pl?language="; | ||||
168 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
169 | $output .= $stash->get(['languages_loo', 0, 'rfc4646_subtag', 0]); | ||||
170 | $output .= "\">"; | ||||
171 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
172 | if (($stash->get(['languages_loo', 0, 'native_description', 0]))) { | ||||
173 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
174 | $output .= $stash->get(['languages_loo', 0, 'native_description', 0]); | ||||
175 | } | ||||
176 | else { | ||||
177 | #line 15 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
178 | $output .= $stash->get(['languages_loo', 0, 'rfc4646_subtag', 0]); | ||||
179 | } | ||||
180 | |||||
181 | $output .= "</a></li>\n "; | ||||
182 | } | ||||
183 | |||||
184 | $output .= " "; | ||||
185 | } | ||||
186 | |||||
187 | $output .= " "; | ||||
188 | } | ||||
189 | |||||
190 | $output .= " "; | ||||
191 | } | ||||
192 | |||||
193 | $output .= " ";; | ||||
194 | ($_tt_value, $_tt_error) = $_tt_list->get_next(); | ||||
195 | } | ||||
196 | }; | ||||
197 | $stash->set('loop', $_tt_oldloop); | ||||
198 | die $@ if $@; | ||||
199 | $_tt_error = 0 if $_tt_error && $_tt_error eq Template::Constants::STATUS_DONE; | ||||
200 | die $_tt_error if $_tt_error; | ||||
201 | }; | ||||
202 | |||||
203 | $output .= " </ul>\n </div>\n "; | ||||
204 | } | ||||
205 | |||||
206 | $output .= " "; | ||||
207 | } | ||||
208 | |||||
209 | $output .= " "; | ||||
210 | #line 24 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
211 | if (($stash->get('OpacKohaUrl'))) { | ||||
212 | $output .= " <span class=\"koha_url\">\n Powered by <strong>\n "; | ||||
213 | #line 22 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
214 | if ($stash->get(['template', 0, 'name', 0, 'match', [ 'opac-main.tt' ]])) { | ||||
215 | $output .= " <a class=\"koha_url\" href=\"http://koha-community.org\">Koha</a>\n "; | ||||
216 | } | ||||
217 | else { | ||||
218 | $output .= " <a class=\"koha_url\" rel=\"nofollow\" href=\"http://koha-community.org\">Koha</a>\n "; | ||||
219 | } | ||||
220 | |||||
221 | $output .= " </strong> \n </span>\n "; | ||||
222 | } | ||||
223 | |||||
224 | $output .= " "; | ||||
225 | } | ||||
226 | |||||
227 | $output .= " "; | ||||
228 | #line 59 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
229 | if ($stash->get('persona')) { | ||||
230 | $output .= " <script src=\"https://login.persona.org/include.js\"></script>\n<script type=\"text/javascript\" language=\"javascript\">\n\nnavigator.id.watch({\n loggedInUser: "; | ||||
231 | #line 28 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
232 | if ($stash->get('emailaddress') && $stash->get('loggedinpersona')) { | ||||
233 | $output .= "'"; | ||||
234 | #line 28 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
235 | $output .= $stash->get('emailaddress'); | ||||
236 | $output .= "'"; | ||||
237 | } | ||||
238 | else { | ||||
239 | $output .= "null"; | ||||
240 | } | ||||
241 | |||||
242 | $output .= ",\n onlogin: function (assertion) {\n \$.post('/cgi-bin/koha/svc/login',\n { assertion: assertion },\n function (data) {\n window.location = '/cgi-bin/koha/opac-user.pl';\n }\n )\n .fail(function() { var errstr = _(\"Could not login, perhaps your Persona email does not match your Koha one\");\n alert(errstr);\n });\n },\n onlogout: function () {\n window.location = '/cgi-bin/koha/opac-main.pl?logout.x=1';\n }\n});\n\nvar signinLink = document.getElementById('browserid');\n\nif (signinLink) {\n signinLink.onclick = function(evt) {\n // Requests a signed identity assertion from the user.\n navigator.id.request({\n siteName: \""; | ||||
243 | #line 51 "/usr/share/koha/opac/htdocs/opac-tmpl/prog/en-NZ/includes/opac-bottom.inc" | ||||
244 | |||||
245 | # FILTER | ||||
246 | $output .= do { | ||||
247 | my $output = ''; | ||||
248 | my $_tt_filter = $context->filter('html') | ||||
249 | || $context->throw($context->error); | ||||
250 | |||||
251 | $output .= $stash->get('LibraryName'); | ||||
252 | |||||
253 | &$_tt_filter($output); | ||||
254 | }; | ||||
255 | |||||
256 | $output .= "\",\n returnTo: '/cgi-bin/koha/opac-user.pl',\n oncancel: function() { alert('user refuses to share identity.'); }\n });\n };\n}\n\n</script>\n"; | ||||
257 | } | ||||
258 | |||||
259 | $output .= " </body>\n</html>\n"; | ||||
260 | } }; | ||||
261 | if ($@) { | ||||
262 | $_tt_error = $context->catch($@, \$output); | ||||
263 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
264 | } | ||||
265 | |||||
266 | return $output; | ||||
267 | } | ||||
268 | |||||
269 | ; |